from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
_magic_number = 2
_modified_time = 1215209423.9709699
_template_filename='/Users/chrismoos/Documents/Code/openlbs/openlbs-server/openlbsserver/templates/track_device.mak'
_template_uri='/track_device.mak'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
_exports = ['content']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, 'base.mak', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack.push_frame()
    try:
        __M_locals = dict(pageargs=pageargs)
        # SOURCE LINE 2
        context.write(u'\n\n')
        return ''
    finally:
        context.caller_stack.pop_frame()


def render_content(context):
    context.caller_stack.push_frame()
    try:
        h = context.get('h', UNDEFINED)
        c = context.get('c', UNDEFINED)
        _ = context.get('_', UNDEFINED)
        # SOURCE LINE 4
        context.write(u'\n\n<a href="/">')
        # SOURCE LINE 6
        context.write(unicode(_('Return to home page.')))
        context.write(u'</a>\n\n<p>')
        # SOURCE LINE 8
        context.write(unicode(_('This page shows the current location of your device.')))
        context.write(u'</p>\n\n<h2>')
        # SOURCE LINE 10
        context.write(unicode(_('Device Information')))
        context.write(u'</h2>\n<b>')
        # SOURCE LINE 11
        context.write(unicode(_('Unique ID')))
        context.write(u':</b> <a href="/track/device/')
        context.write(unicode(c.device.id))
        context.write(u'/">')
        context.write(unicode(c.device.device_uid))
        context.write(u' (')
        context.write(unicode(hex(int(c.device.device_uid))))
        context.write(u')</a> <br/>\n\n')
        # SOURCE LINE 13
        if c.no_location:
            # SOURCE LINE 14
            context.write(u'\n<p>')
            # SOURCE LINE 15
            context.write(unicode(_("The device hasn't reported any locations yet.")))
            context.write(u'</p>\n\n')
            # SOURCE LINE 17
        else:
            # SOURCE LINE 18
            context.write(u'\n<h2>')
            # SOURCE LINE 19
            context.write(unicode(_('Current Location')))
            context.write(u'</h2>\n\n<b>')
            # SOURCE LINE 21
            context.write(unicode(_('Latitude')))
            context.write(u'</b>: ')
            context.write(unicode(c.location.latitude))
            context.write(u', <b>')
            context.write(unicode(_('Longitude')))
            context.write(u'</b>: ')
            context.write(unicode(c.location.longitude))
            context.write(u' <br/>\n<b>')
            # SOURCE LINE 22
            context.write(unicode(_('Altitude')))
            context.write(u'</b>: ')
            context.write(unicode(c.location.altitude))
            context.write(u' ')
            context.write(unicode(_('meters')))
            context.write(u' <br/>\n<b>')
            # SOURCE LINE 23
            context.write(unicode(_('Speed')))
            context.write(u'</b>: ')
            context.write(unicode(c.location.speed))
            context.write(u' ')
            context.write(unicode(_('meters/second')))
            context.write(u' <br/>\n<b>')
            # SOURCE LINE 24
            context.write(unicode(_('Heading')))
            context.write(u'</b>: ')
            context.write(unicode(h.get_heading(c.location.heading)))
            context.write(u', ')
            context.write(unicode(c.location.heading))
            context.write(u' ')
            context.write(unicode(_('degrees')))
            context.write(u' <br/>\n<b>')
            # SOURCE LINE 25
            context.write(unicode(_('Date')))
            context.write(u'</b>: ')
            context.write(unicode(c.location.date))
            context.write(u' UTC <br/> <br/>\n\n<a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=')
            # SOURCE LINE 27
            context.write(unicode(c.location.latitude))
            context.write(u',')
            context.write(unicode(c.location.longitude))
            context.write(u'&ie=UTF8&z=16&iwloc=addr">')
            context.write(unicode(_('View this location in Google Maps')))
            context.write(u'</a>\n\n')
        # SOURCE LINE 30
        context.write(u'\n')
        return ''
    finally:
        context.caller_stack.pop_frame()


